# -*- coding: utf-8 -*-
# @Time : 2023/7/19 20:09
# @Author : cute
# @Email : Aggressive_cute@126.com
# coding:utf-8
import redis

import os
from dotenv import load_dotenv

load_dotenv()


# 创建Redis连接池 单例模式
REDIS_POOL = redis.ConnectionPool(
    # 本地
        host=os.environ.get("REDISDB_LOCAL_USER_HOST"),
    password=os.environ.get("REDISDB_LOCAL_PASSWORD"),

# 服务器
#     host=os.environ.get("REDISDB_USER_HOST"),
#       password=os.environ.get("REDISDB_PASSWORD"),

    port=int(os.environ.get("REDISDB_IP_PORTS")),
    db=os.environ.get("REDISDB_DB"), decode_responses=True)
# print(REDIS_POOL)